Stochastic computing (SC) has gained traction in recent years again. SC has been applied to a wide variety of applications such as image processing, error correction, and neural networks. In SC, circuits operate on randomized bit streams. The signal value is encoded by the probability of obtaining a one versus a zero in the stream. In the “unipolar” representation, a real-valued number x (0≤x≤1) is represented by a stream in which each bit has probability x of being one and probability (1−x) of being zero. In the “bipolar” representation, a real-valued number y (−1≤y≤1) is represented by a stream in which each bit has probability
      y    +    1    2of being one and probability
  1  -            y      +      1        2  of being zero.
A stochastic representation may be less compact than conventional binary radix. However, complex operations can be performed with remarkably simple logic. For example, a single AND performs multiplication with the unipolar representation; a single XNOR gate performs multiplication with the bipolar representation. A multiplexer implements scaled addition and subtraction. Complex functions, such as exponentials and trigonometric functions, can be computed through polynomial approximations.
In addition to producing simple and compact logic, a stochastic representation offers the advantage of error tolerance. The environment can be noisy: bit flips occur and these afflict all the bits with equal probability. With a conventional binary radix representation, the high-order bits represent a large magnitude; accordingly, faults can produce large errors. In contrast, with a stochastic representation, all the bits are equally weighted. Hence, a single flip results in a small error. This error tolerance scales to high error rates: multiple bit flips produce only small and uniform deviations from the nominal value.
A premise for SC is the availability of stochastic bit streams with the requisite probabilities. In prior work, these stochastic bit streams were generated from physical random sources or with pseudo-random constructs such as linear-feedback shift registers (LFSRs). These stochastic number generator (SNG) modules may contribute heavily to the hardware cost. Indeed, in some cases, they accounted for 80% or more of the overall hardware cost. Consequently, SNGs may consume a significant amount of power. Noting that energy equals power multiplied by time, the long run-time of stochastic circuits, together with the high power consumption of the SNGs, could lead to higher energy use than their conventional binary counterparts.